Chapter 30: Creating Program Scripts
Table Of Contents
Chapter 30: Creating Program Scripts
Understanding Script Nodes
Defining a Program Script
Controlling Program-Script Behavior
Writing Java and JavaScript Program Scripts
Accessing Interface Fields and EventOuts
Converting between Data Types
Responding to Multiple Events
The Java and JavaScript APIs
Experimenting with Scripts
Figure 30.1
A moving red sphere and a custom interpolator.
Creating a Sine-Wave Interpolator
Creating a Helical Interpolator
Building a Boolean Event Filter
Figure 30.2
A filter used to make a group of radio buttons that select among backgrounds.
Building a Time-Stamp Filter
Figure 30.3
A pair of filters used to create a momentary on-off switch.
Building a Route Debugger
Figure 30.4
A debug filter used to monitor the output of a TimeSensor node.
Controlling a Shape with a Program Script
Figure 30.5
A donut shape built with a donut-maker program script.